package ltmm.server;

import spark.Request;
import spark.Response;
import spark.Route;

public class testServerUtils {
    public static void main(String[] args) {
        ServeUtils serveUtils = new ServeUtils();
        serveUtils.start();
//
        serveUtils.push(new RouteObject("/hello1", new Route() {
            @Override
            public Object handle(Request request, Response response) throws Exception {
                return "helloworld";
            }
        }));
        RouteObjectFactory routeObjectFactory = new RouteObjectFactory();
        RouteObject routeObject = routeObjectFactory.getRouteObject("world23", new IRouteFuntion() {
            @Override
            public Object handle(Request req, Response res) {
                return "hello hello world";
            }
        });
        serveUtils.push(routeObject);
//        serveUtils.push(new RouteObject("world", new Route() {
//            @Override
//            public Object handle(Request request, Response response) throws Exception {
//                return "hello hello world";
//            }
//        }));
    }
}
